﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="frmListaDeEmpresas.aspx.cs" Inherits="frmListaDeEmpresas" EnableEventValidation="false" %>

<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            color: #0000FF;
            font-size: x-large;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
<h4>Menu</h4>
        <br>
        <p>
        <a href="frmEmpresa.aspx">Empresa</a>
        <br>
        <a href="frmListaDeEstablecimientos.aspx">Establecimientos</a>
        <br>
        <a href="frmContacto.aspx">Contactos</a>
        <br>
        <a href="frmEmpleados.aspx">Empleados</a>
        <br>
      
        </p>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h1>Listado de Empresas</h1>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" BackColor="White" BorderColor="White" 
        BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" 
        DataKeyNames="cuit" DataSourceID="SqlDataSource2" GridLines="None" 
        onselectedindexchanged="GridView1_SelectedIndexChanged" PageSize="15" 
        Width="1105px" AllowSorting="True">
        <Columns>
            <asp:CommandField ShowSelectButton="True" ButtonType="Image" 
                HeaderText="Seleccion" SelectImageUrl="~/Img/ico_chico_ok.png" >
            <ItemStyle HorizontalAlign="Center" />
            </asp:CommandField>
            <asp:BoundField DataField="cuit" HeaderText=" CUIT" ReadOnly="True" 
                SortExpression="cuit" >
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="razonSocial" HeaderText=" Razon Social" 
                SortExpression="razonSocial" >
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="nombreComercial" HeaderText=" Nombre Comercial" 
                SortExpression="nombreComercial" >
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="numTelefono" HeaderText=" Telefono" 
                SortExpression="numTelefono" >
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="calle" HeaderText=" Calle" 
                SortExpression="calle" >
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="numeroCalle" HeaderText=" Nro." 
                SortExpression="numeroCalle" >
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="piso" HeaderText=" Piso" 
                SortExpression="piso" >
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="departamento" HeaderText=" Dpto." 
                SortExpression="departamento" >
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="estado" HeaderText=" Estado" 
                SortExpression="estado" >
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="descripcionCondIva" HeaderText=" Cond. IVA" 
                SortExpression="descripcionCondIva" >
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
        </Columns>
        <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
        <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
        <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
        <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#594B9C" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#33276A" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        
        SelectCommand="SELECT T_Empresa.cuit, T_Empresa.razonSocial, T_Empresa.nombreComercial, T_Empresa.dirCorreo, T_Empresa.numTelefono, T_Empresa.calle, T_Empresa.numeroCalle, T_Empresa.piso, T_Empresa.departamento, T_Empresa.estado, T_CondIva.descripcionCondIva FROM T_Empresa INNER JOIN T_CondIva ON T_Empresa.idCondIva = T_CondIva.idCondIva">
    </asp:SqlDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="GetData" 
        TypeName="SAFADataSetEmpresas1TableAdapters.VistaEmpresasTableAdapter">
    </asp:ObjectDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        
        SelectCommand="SELECT T_Empresa.cuit, T_Empresa.razonSocial, T_Empresa.nombreComercial, T_Empresa.dirCorreo, T_Empresa.numTelefono, T_Empresa.calle, T_Empresa.numeroCalle, T_Empresa.piso, T_Empresa.departamento, T_Empresa.estado, T_Barrio.nombreBarrio, T_Localidad.nombreLocalidad, T_CondIva.descripcionCondIva FROM T_Empresa INNER JOIN T_Barrio ON T_Empresa.idBarrio = T_Barrio.idBarrio INNER JOIN T_Localidad ON T_Empresa.idLocalidad = T_Localidad.idLocalidad INNER JOIN T_CondIva ON T_Empresa.idCondIva = T_CondIva.idCondIva"></asp:SqlDataSource>
    <p>
        &nbsp;</p>
    <p>
        <asp:Button ID="Button3" runat="server" Height="31px" onclick="Button3_Click1" 
            Text="Imprimir Listado" Width="266px" />
        </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Volver" 
            Height="32px" Width="160px" Visible="False" />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" 
            Text="Exportar a PDF" Visible="False" />
    </p>
</asp:Content>

